﻿@model TenderSampleApp.Models.VATModel

@{
    ViewBag.Title = "EditVatModel";
    Layout = "~/Views/Shared/_Layout.cshtml";
    <script type="text/javascript">
//        $(document).ready(function () {

//            $('input[type=text]').each(function () {
//               var val=$(this).val();
//               if(val.indexOf(",")!=-1)
//               {
//                    val=val.replace(",",".");
//                    $(this).val(val);
//               }
//            });
//        });
    </script>
}

<h2>EditVatModel</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
  @*  @Html.ValidationSummary(true)*@
   @* <fieldset>*@
        <legend>Редактувати ВАТ</legend>

        @Html.HiddenFor(model => model.ID)

        <div class="editor-label">
            @Html.LabelFor(model => model.Code)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Code)
            @Html.ValidationMessageFor(model => model.Code)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PostIndex)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PostIndex)
            @Html.ValidationMessageFor(model => model.PostIndex)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Region)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Region)
            @Html.ValidationMessageFor(model => model.Region)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.District)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.District)
            @Html.ValidationMessageFor(model => model.District)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.City)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.City)
            @Html.ValidationMessageFor(model => model.City)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Street)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Street)
            @Html.ValidationMessageFor(model => model.Street)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Build)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Build)
            @Html.ValidationMessageFor(model => model.Build)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Apartment)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Apartment)
            @Html.ValidationMessageFor(model => model.Apartment)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PhoneNumber)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PhoneNumber)
            @Html.ValidationMessageFor(model => model.PhoneNumber)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.BranchCode)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BranchCode)
            @Html.ValidationMessageFor(model => model.BranchCode)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ManagerFIO)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ManagerFIO)
            @Html.ValidationMessageFor(model => model.ManagerFIO)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TotalAssets)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TotalAssets)
            @Html.ValidationMessageFor(model => model.TotalAssets)
        </div>
 
       

        <div class="editor-label">
            @Html.LabelFor(model => model.REG_OWN)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.REG_OWN)
            @Html.ValidationMessageFor(model => model.REG_OWN)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StockQuantity)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.StockQuantity)
            @Html.ValidationMessageFor(model => model.StockQuantity)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.RatedCost)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RatedCost)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.BeginCost)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BeginCost)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
  @*  </fieldset>*@
}

<div>
    @Html.ActionLink("НАЗАД", "AddVatToAuction", new { num = ViewData["aucnum"] })
</div>
